package com.itheima.demo02;

public class MyTreadDemo {
    public static void main(String[] args) {
        MyThread01 thread1 = new MyThread01();
        MyThread02 thread2 = new MyThread02();
        MyThread01 thread3 = new MyThread01();
        thread3.setName("绝对优先");
        thread1.setName("主线程");
        thread2.setName("守护线程");
        thread2.setDaemon(true);
        thread1.start();
        thread2.start();
        thread3.start();
        try {
            thread3.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
